package com.ykh.mybbsdemo.controller;

import com.ykh.mybbsdemo.pojo.User;
import com.ykh.mybbsdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-29
 * Time: 15:29
 */
@RestController
public class TestController {
    @Autowired
    private UserService userService;

    @GetMapping("/test")
    public List<User> getAllUser() {
        return userService.getAllUser();
    }
}
